package com.ncepu.clubmanagement.service;

import com.ncepu.clubmanagement.exception.FileUploadException;
import com.ncepu.clubmanagement.service.UploadAssist.FileUrlProvider;
import com.ncepu.clubmanagement.service.UploadAssist.FileUrlUpdater;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UploadService {
    public String universalUploadFile(String fileName, String filePath,
                                      MultipartFile file,
                                      FileUrlProvider fileUrlProvider,
                                      FileUrlUpdater fileUrlUpdater,
                                      String label) throws Exception;

    public String uploadFileWithRecord(String fileName,String filePath,MultipartFile file,
                                       String label) throws FileUploadException;

    public void releaseUrlResource(String url);

    public void setUrlResourceUsed(String url);

    public void universalMoveFile(String fileName, String filePath, String sourceUrl,
                                  FileUrlProvider fileUrlProvider, FileUrlUpdater fileUrlUpdater,
                                  String label) throws Exception;

    public void setUrlResourceUsed(List<String> urls);

    public void deleteUrlResourceNotInTable(String url);
}
